import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm';

@Entity()
export class Menu {
  @PrimaryGeneratedColumn()
  id: number;

  @Column({ length: 255 })
  name: string;

  @Column({ length: 255 })
  path: string;

  @Column({ length: 255, nullable: true })
  redirect: string;

  @Column({ length: 255, nullable: true })
  meta: string;

  // 父菜单ID
  @Column({ default: 0 })
  pid: number;

  // 是否可用 0：不可用，1：可用
  @Column({ default: 1 })
  status: number;
  @Column({ default: 'clarity:tree-view-line' })
  icon: string;
}
